package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketIssue;
import com.cskaoyan.bean.MarketIssueExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketIssueMapper {
    long countByExample(MarketIssueExample example);

    int deleteByExample(MarketIssueExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketIssue record);

    int insertSelective(MarketIssue record);

    List<MarketIssue> selectByExample(MarketIssueExample example);

    MarketIssue selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketIssue record, @Param("example") MarketIssueExample example);

    int updateByExample(@Param("record") MarketIssue record, @Param("example") MarketIssueExample example);

    int updateByPrimaryKeySelective(MarketIssue record);

    int updateByPrimaryKey(MarketIssue record);

    /**
     * 查询所有未删除的MarketIssue
     *
     * @param question
     * @param sort
     * @param order
     * @return {@link List }<{@link MarketIssue }>
     * @author: jinmo
     * @date: 2022/06/26 18:58:07
     */
    List<MarketIssue> select(@Param("question") String question, @Param("sort") String sort, @Param("order") String order);

    /**
     * 插入并为对象id赋值
     *
     * @param marketIssue 不包括id和deleted
     * @author: jinmo
     * @date: 2022/06/26 17:52:25
     */
    void insertWithId(MarketIssue marketIssue);

    /**
     * 更新通用问题
     *
     * @param marketIssue 市场问题
     * @author: jinmo
     * @date: 2022/06/26 18:19:44
     */
    void updateCommonIssue(MarketIssue marketIssue);


    /**
     * 更新常见问题删除列数据
     *
     * @param marketIssue 市场问题
     * @author: jinmo
     * @date: 2022/06/26 18:47:03
     */
    void updateCommonIssueDeleted(MarketIssue marketIssue);
}